<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="pragma" content="no-cache" />
<title>发布公告</title>
        <link rel="stylesheet" type="text/css" href="../style/style.css" />

		<script type="text/javascript" src="../js/jquery/lib/jquery-1.4.4.min.js"></script>
        <script type="text/javascript" src="../js/jquery/plugin/validate/jquery.validate.js"></script>
        <script type="text/javascript" src="../js/jquery/plugin/validate/i18n/messages_cn.js"></script>
        <link type="text/css" rel="stylesheet" href="../js/jquery/plugin/formValidator/style/validator.css"/> 
        <script type="text/javascript" src="../js/jquery/plugin/formValidator/formValidator.js" ></script>
        <script type="text/javascript" src="../js/jquery/plugin/formValidator/formValidatorRegex.js" ></script>
        <link type="text/css" rel="stylesheet" href="../style/datepicker.css"/>
        
        <script type="text/javascript" src="/js/jquery/ui/jquery-ui-1.8.10.custom.js"></script>
<script type="text/javascript" src="/js/jquery/ui/i18n/jquery.ui.datepicker-zh-CN.js"></script>
<script type="text/javascript" src="/js/jquery/lib/jquery.cookie.js"></script>
<script type="text/javascript" src="/js/jquery/lib/jquery.hotkeys.js"></script>
<script type="text/javascript" src="/js/jquery/plugin/jstree/jquery.jstree.js" ></script>
        <script type="text/javascript" src="../js/announcement_add.js"></script>
        
<script type="text/javascript"> 
$(document).ready(function(){
         treeno();
}); 
function tab(a,b,c) { 
			  if(c==2){
					treeyes();
				}else{
					treeno();
				}
          for(i=1;i<=b;i++){ 
              if(c==i){ 
              // 判断选择模块
	            
              document.getElementById(a+"M"+i).className = "on";   // 改变菜单为选中样式
              } else{ 
              // 没有选择的模块
             	
              document.getElementById(a+"M"+i).className = "q";  // 清空没有选择的菜单样式
              } 
          } 
      }
</script>
<script type="text/javascript">
function treeyes() {
$("#divOrg").empty();
$("#divOrg")
	.jstree({ 
		// List of active plugins
		"plugins" : [ 
			"themes","json_data","ui","checkbox"
		],

		// I usually configure the plugin that handles the data first
		// This example uses JSON as it is most common
		"json_data" : { 
			// This tree is ajax enabled - as this is most common, and maybe a bit more complex
			// All the options are almost the same as jQuery's AJAX (read the docs)
			"ajax" : {
				// the URL to fetch the data
				"url" : "/doc/officialDocGetOrg.action",
				// the `data` function is executed in the instance's scope
				// the parameter is the node being loaded 
				// (may be -1, 0, or undefined when loading the root nodes)
				"dataroot":"orgList",
				"data" : function (n) { 
					// the result is fed to the AJAX request `data` option
					return {
						"orgid" : n.attr ? n.attr("id").replace("node_","") : 0,
						"selSection" : $("#divOrg").attr("selvals")
					}; 
				}
			}
		},
		"checkbox" : {
			"override_ui" : true
		}
	}).bind("loaded.jstree", function(e, data){
		$("#divOrg").jstree("open_all");
		$("#divOrg").find("li").each(function(){
			if($(this).attr("checkedstate") == "checked"){
				$("#divOrg").jstree("check_node", $(this));
			}
		});
	});
}
function treeno() {
$("#divOrg").empty();
$("#divOrg")
	.jstree({ 
		// List of active plugins
		"plugins" : [ 
			"themes","json_data","ui","checkbox"
		],

		// I usually configure the plugin that handles the data first
		// This example uses JSON as it is most common
		"json_data" : { 
			// This tree is ajax enabled - as this is most common, and maybe a bit more complex
			// All the options are almost the same as jQuery's AJAX (read the docs)
			"ajax" : {
				// the URL to fetch the data
				"url" : "/doc/officialDocGetOrg.action",
				// the `data` function is executed in the instance's scope
				// the parameter is the node being loaded 
				// (may be -1, 0, or undefined when loading the root nodes)
				"dataroot":"orgList",
				"data" : function (n) { 
					// the result is fed to the AJAX request `data` option
					return {
						"orgid" : n.attr ? n.attr("id").replace("node_","") : 0,
						"selSection" : $("#divOrg").attr("selvals")
					}; 
				}
			}
		},
		"checkbox" : {
			"override_ui" : true,
			"two_state" : true
		}
	}).bind("loaded.jstree", function(e, data){
		$("#divOrg").jstree("open_all");
		$("#divOrg").find("li").each(function(){
			if($(this).attr("checkedstate") == "checked"){
				$("#divOrg").jstree("check_node", $(this));
			}
		});
	});
}

//-->
</script>

</head>
<body class="indexbody">

<div id="Content">
  <div style="width:100%; ">
  <div urlvalue="Oasp2803" functionid="FUNC00004" urlname="公告" recordcount="5" minflg="0" class="DesktopBlock" id="FUNC00004">
  <div id="Block">
          <div id="BlockHead">
            <table border="0" cellspacing="0" cellpadding="0" height="100%" width="100%">
              <tbody>
                <tr valign="center">
                  <td width="5"></td>
                  <td>添加公告信息</td> 
                  <td width="22"></td>
                </tr>
              </tbody>
            </table>
          </div>
          
          <form method="post" action="announcementAdd.action" id="announcementAdd" name="announcementAdd">
          <input type="hidden" name="announcement.receive" id="receive"/>
          
           <div id="BlockDetail">
             <table  border="0" cellpadding="1" cellspacing="1" width="100%" bgcolor="#f9f9f9">
               <tr>
                 <td bordercolor="#ffffff" align="right" width="145">公告名称：</td>
                 <td width="300" height="35" bordercolor="#ffffff"><input id="announcement_name" name="announcement_name" size="20" maxlength="20"/><div id="announcement_nameTip"></div></td>
               
               </tr>
               <tr>
                 <td bordercolor="#ffffff" align="right" width="145">开始日期：</td>
                 <td bordercolor="#ffffff" align="left" width="388"><input  id="id_startDate" name="start_date" type="text" value=""  size="15" readonly="true" style="height:18px;" class="ipticon" /><div id="id_startDateTip"></div></td>
               </tr>
               
               <tr>  
                 <td bordercolor="#ffffff" align="right" width="145">结束日期：</td>
                 <td bordercolor="#ffffff" align="left" width="388"><input  id="id_backDate" name="end_date" type="text" value=""  size="15" readonly="true" style="height:18px;" class="ipticon" /><div id="id_backDateTip"></div></td>
               </tr>
  
               <tr>
                 <td align="right">公告内容：</td>
                 <td colspan="3" height="35">
                   <label>
                     <textarea name="announcement_content" id="announcement_content" cols="45" rows="5"></textarea>
                   </label>
                <div id="announcement_contentTip"></div></td>
                 <td align="middle" height="35">&nbsp;</td>
                 <td height="35">&nbsp;</td>
               </tr>
               
               <tr>
				<td vAlign=center bgColor=#f6f6f6 align=right><span class="STYLE2 STYLE3"><span class="h2-red">*</span>接收单位：</span>
				</td>
				<td class="STYLE109 STYLE2 STYLE2" bgColor=#f6f6f6 align=left colspan=5 height=40>
				<div class="right_con">
					<ul class="rig_nav3">
						<li id="hotel_2-M1" class="on"><a  href="javascript:void(0);" onClick="tab('hotel_2-',8,1)">单例选择</a>
						</li>
						<li id="hotel_2-M2" class="q"><a  href="javascript:void(0);" onClick="tab('hotel_2-',8,2)">批量选择</a>
						</li>
					</ul>
				</div>
				<div id="divOrg" selvals=""></div>
</td>
				</tr>
				
               <tr>
                 <td align="right">&nbsp;</td>
                 <td colspan="4" height="35"><ul >
                   <li class="mar-l5 height-30 ">
                     <div class="left">
                      
                       <!--button按钮开始--->
				         <button name="submit" type="submit" id="announcementAdd" tabindex="4" onClick ="return validateadd();">添加公告信息</button>
				       <!--button按钮结束--->
                  </div>
                  
                  <div class="left mar-l25">
                     
                       <!--button按钮开始--->
				         <button  type="button" id="uw_flight_submit_lnk" tabindex="4"  onclick="location.href='javascript:history.go(-1);'">返回</button>
				       <!--button按钮结束--->
                  </div>
                   </li>
                 </ul></td>
                 <td height="35">&nbsp;</td>
               </tr>
             </table>
           </div> 
           </form>
           </div>
           </div>
           </div>
           
      </div>
        
<script type="text/javascript" src="../js/mgtool.js"></script>
<script type="text/javascript" src="../js/DatePicker.js"></script>
<script type="text/javascript" src="../js/h_index_2012.js"></script>
</body>
</html>

